IF OBJECT_ID('ssf.ptx_get_active_task_parents') IS NOT NULL
	DROP FUNCTION ssf.ptx_get_active_task_parents
GO

CREATE FUNCTION ssf.ptx_get_active_task_parents (
	@task_id INT
)
RETURNS TABLE
AS
/*
<object_header>

<object_summary>
	<purpose><![CDATA[

	]]></purpose>
</object_summary>

</object_header>
*/

	RETURN (
		SELECT depends_on_task_id AS task_id
		FROM ssf.ptx_task_dependency WITH (NOLOCK)
		WHERE task_id = @task_id
		AND active_fl = 1
	)
GO
